#!/bin/sh

VERSION=1
if [ "$1" != "" ];
then
   VERSION=$1
fi

echo "VERSION is $VERSION"

echo "开始构建镜像"
# 构建镜像
docker build -f Dockerfile -t registry.cn-hangzhou.aliyuncs.com/bkhech-custom/jdk-debian-slim:17.0.13-${VERSION} .

# 登录阿里云Docker Registry
# docker login --username=guowenmeng24@163.com --password 123456 registry.cn-hangzhou.aliyuncs.com

# 推送至远程镜像仓库
docker push registry.cn-hangzhou.aliyuncs.com/bkhech-custom/jdk-debian-slim:17.0.13-${VERSION}


